﻿using Day23Movies.Adapters;
using Day23Movies.Adapters.Data;
using Day23Movies.Adapters.Mock;
using Day23Movies.Data;
using Day23Movies.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Day23Movies.Controllers
{
    public class HomeController : Controller
    {
        private IHomeAdapter _adapter;

        public HomeController()
        {
            _adapter = new HomeMockAdapter();
        }

        public HomeController(IHomeAdapter adapter)
        {
            _adapter = adapter;
        }

        public ActionResult Index()
        {
            MovieListViewModel model = _adapter.GetAllMovies();

            return View(model);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}